import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import directiveObj from "@/utils/directive";
import "./VueComponents"; //将vant组件库的注册抽离成一个js文件，使main.js更加简洁
import "highlight.js/styles/default.css"; // 代码高亮的样式
//根据网页宽度，设置html的font-size
import "amfe-flexible";

Vue.config.productionTip = false;

//node执行main.js时的全局变量
console.log(process);
//直接使用指令
// Vue.directive("fofo", {
//   inserted(el) {
//     const theInput = el.querySelector("input");
//     theInput.focus();
//   },
// });

//use方法注册中间件会执行参数中的install方法
Vue.use(directiveObj);

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
